﻿using HopeHealth.Domain.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace HopeHealth.WebApp.Areas.Admin.Controllers
{
    public class MediaController : Controller
    {
        public ActionResult Index()
        {
            List<HopeHealth.Domain.Entities.MediaFolder> rootFolders = new HopeHealth.Domain.Services.MediaService().GetFolders(null);

            return View(rootFolders);
        }

        [HttpGet]
        public ActionResult CreateFolder()
        {
            return View();
        }

        [HttpPost]
        public ActionResult CreateFolder(Guid? parentId, string name)
        {
            new MediaService().CreateFolder(parentId, name, 1);
            
            return View();
        }
    }
}